﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DLM.Domain.Model;
using DLM.Domain.Repositories;
using DLM.Infrastructure.UnitOfWork;
using DLM.Infrastructure.Domain;

namespace DLM.Data.EF.CodeFirst.Repositories
{
    public class BonusCalculateStepRepository : Repository<BonusCalculateStep, int>, IBonusCalculateStepRepository
    {
        public BonusCalculateStepRepository(IUnitOfWork unitOfWork)
            : base(unitOfWork)
        {

        }

        public IEnumerable<BonusCalculateStep> FindByPartyAndUser(int partyID, int userID)
        {
            return this.ActiveContext.BonusCalculateStep.Where(b => b.PartyID == partyID && b.UserID == userID).ToList();
        }

        public new System.Collections.IEnumerator GetEnumerator()
        {
            throw new NotImplementedException();
        }
    }
}
